home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
PROGRAM
/
TP112992.ARJ
/
11-29-92.TPC
Wrap
Text File
|
1992-11-29
|
71KB
|
2,176 lines
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 11-23-92 05:23:30
From Trevor Carlsen
To Frank Masingill
Subject Reading a number from com
FM> Maybe THAT'S the answer. I never upgraded from 5.5 I don't
FM> recall the program now but do recall capturing it. I
FM> usually send such code to a subdirectory of some category I
FM> think it fits and then I shell out of my editor to test it.
TP55 should have exactly the same result here. What commandline did you use
that did not work?
TeeCee
--- TC-ED v2.01
* Origin: The Pilbara's Pascal Centre (+61 91 732930) (3:690/644)
* Tossed by SFToss/286 v1.02a on 92/11/24 09:38:08
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 11-23-92 13:37:35
From Trevor Carlsen
To Kelly Small
Subject Array of Pointers
TC> It is probably overkill to use an array of pointers for this
TC> as it would u almost 50% as much memory again. Better may
TC> be to split the strings into arrays with very little memory
TC> penalty.
KS> This what I tried, but ran into problems with routines such
KS> quicksort.
Done as I suggested it would not be a problem.
BTW my estimate of an array of pointers method taking up almost as much as
50% extra memory would be way off the mark. Assuming you are using TP6 every
string[8] allocated would take 20 bytes - 16 for the string and 4 for the
pointer. Makes an array of pointers even less attractive in this case.
TeeCee
--- TC-ED v2.01
* Origin: The Pilbara's Pascal Centre (+61 91 732930) (3:690/644)
* Tossed by SFToss/286 v1.02a on 92/11/24 09:38:09
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 11-23-92 13:16:01
From Trevor Carlsen
To Bob Barberio
Subject JUSTIFYING TEXT
BB> ... I have to write a program that reads a file as input and
BB> prints the file right and left justifying the text. It must
BB> print 60 characters per line.
Here is a program that demonstrates both word wrap and justifying. The wrap
routine was posted here some weeks back and the justifying has been added.
I'll leave it to you to add your own reading the file routines.
var
S : string;
function Wrap(var st: string; maxlen: byte; justify: boolean): string;
{ returns a string of no more than maxlen characters with the last }
{ character being the last space before maxlen. On return st now has }
{ the remaining characters left after the wrapping. }
const
space = #32;
var
len : byte absolute st;
x,
oldlen,
newlen : byte;
function JustifiedStr(s: string; max: byte): string;
{ Justifies string s left and right to length max. If there is more }
{ than one trailing space, only the right most space is deleted. The}
{ remaining spaces are considered "hard". #255 is used as the char }
{ used for padding purposes. This will enable easy removal in any }
{ editor routine. }
const
softSpace = #255;
var
jstr : string;
len : byte absolute jstr;
begin
jstr := s;
while (jstr[1] = space) and (len > 0) do { delete all leading spaces }
delete(jstr,1,1);
if jstr[len] = space then
dec(len); { Get rid of trailing space }
if not ((len = max) or (len = 0)) then begin
x := pos('.',jstr); { Attempt to start padding at sentence break }
if (x = 0) or (x =len) then { no period or period is at length }
x := 1; { so start at beginning }
if pos(space,jstr) <> 0 then repeat { ensure at least 1 space }
if jstr[x] = space then { so add a soft space }
insert(softSpace,jstr,x+1);
x := succ(x mod len); { if eoln is reached return and do it again }
until len = max; { until the wanted string length is achieved }
end; { if not ... }
JustifiedStr := jstr;
end; { JustifiedStr }
begin { Wrap }
if len <= maxlen then begin { no wrapping required }
Wrap := st;
len := 0;
end else begin
oldlen := len; { save the length of the original string }
len := succ(maxlen); { set length to maximum }
repeat { find last space in st before or at maxlen }
dec(len);
until (st[len] = space) or (len = 0);
if len = 0 then { no spaces in st, so chop at maxlen }
len := maxlen;
if justify then
Wrap := JustifiedStr(st,maxlen)
else
Wrap := st;
newlen := len; { save the length of the newly wrapped string }
len := oldlen; { and restore it to original length before }
Delete(st,1,newlen); { getting rid of the wrapped portion }
end;
end; { Wrap }
begin
S :=
'By far the easiest way to manage a database is to create an '+
'index file. An index file can take many forms and its size will depend '+
'upon how many records you want in the db. The routines that follow '+
'assume no more than 32760 records.';
while length(S) <> 0 do
writeln(Wrap(S,60,true));
end.
Whilst this is tested and known to work on the example string, no further
testing than that has been done. I suggest you test it a great deal more
before being satisfied that it is OK.
TeeCee
--- TC-ED v2.01
* Origin: The Pilbara's Pascal Centre (+61 91 732930) (3:690/644)
* Tossed by SFToss/286 v1.02a on 92/11/24 09:38:09
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 11-23-92 12:56:21
From Trevor Carlsen
To Dave Jarvis
Subject Checking file types
DJ> USES DOS;
DJ> VAR
DJ> DirInfo : SearchRec;
DJ> Ext : STRING[3];
DJ> Begin
DJ> FindFirst( '*.*', AnyFile, DirInfo );
DJ> WHILE DOSError = 0 DO
DJ> Begin
DJ> IF (DirInfo.Attr AND Directory) <> Directory THEN
DJ> Begin
DJ> Ext := UpCase( DirInfo.Name[10] ) + UpCase( DirInfo.Name[11] ) +
DJ> UpCase( DirInfo.Name[12] );
The above statement assumes that the extension is always the 10..12th character
of the name string. That is not so. It also unnecessarily converts to uppercas
. The name string returned by FindFirst/Next is always uppercase and needs
no conversion.
Change the declaration of ext to string[4] and then replace with
with DirInfo do
if pos('.',name) <> 0 then
ext := copy(name,pos('.',name),4)
else { no extension }
ext := ' '; { to prevent nul string }
Perhaps better still may be to use the FSplit procedure.
DJ> IF (Pos( 'COM', Ext ) = 0) AND (Pos( 'EXE', Ext ) = 0) AND
DJ> (Pos( 'OBJ', Ext ) = 0) THEN
for the above statement it is better to -
if not (pos(ext,'.COM.EXE.OBJ') = 0) then
DJ> PrintFile( DirInfo.Name );
DJ> End;
DJ> FindNext( DirInfo );
DJ> End;
DJ> END.
--- TC-ED v2.01
* Origin: The Pilbara's Pascal Centre (+61 91 732930) (3:690/644)
* Tossed by SFToss/286 v1.02a on 92/11/24 09:38:09
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 11-23-92 15:50:53
From Trevor Carlsen
To Charles Lindsay
Subject Speed
CL> Does anybody know how to make Turbo Pascal find the speed of
CL> a computer! Also, is there a program to find the speed that
CL> a modem is connected at. I got the file BPS_RATE, but It
CL> tell's what speed the Port is Opened up at. I need
CL> something that will tell what Baud it is connected at
CL> without looking at the CONNECT STRING?
Have a little deeper think about that!
What you are asking for is a method of determining some information about
a peripheral not connected to the computer in any way except by the serial
port. But you are not interested in the speed of that interface, only the
speed of the interface beyond the peripheral which has previously advised
that speed via its CONNECT string.
Obviously the only way you can get that information is by interogating the
peripheral. To my knowledge there is no standard modem command that will result
in the modem resending that information. The Telebit TrailBlazer can be request
d to provide this information via the ATI command. Other modens may have
similar commands available.
However the whole question is really beyond the scope of on-topic discussion
in this echo although I note you were asking for a TP way - so the short
answer is no. Better that you ask in a technical echo.
As far as determining the speed of your computer, there may be others that
will give you a definitive answer. It will almost certainly involve assembler
rather than TP (in fact I am sure of that!).
TeeCee
--- TC-ED v2.01
* Origin: The Pilbara's Pascal Centre (+61 91 732930) (3:690/644)
* Tossed by SFToss/286 v1.02a on 92/11/24 09:38:09
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 11-23-92 23:28:54
From Trevor Carlsen
To Colin Jones
Subject TURBO C++
CJ> I just got Turbo C++(Borland) and I have only had experience
CJ> in GWBasic...which makes it kind of dificult to
CJ> understand...if anyone has knowlage about C++
Not real clever - asking this question in the Pascal echo. Try the C echo
and you may do better re informed answers.
TeeCee
--- TC-ED v2.01
* Origin: The Pilbara's Pascal Centre (+61 91 732930) (3:690/644)
* Tossed by SFToss/286 v1.02a on 92/11/25 08:06:04
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 11-23-92 23:42:37
From Trevor Carlsen
To Rich Paul
Subject Reset and ReWrite TP6.0 Style?
RP> I was using typed files, and tried to rewrite one, (which
RP> should be read/write access), read a record from it,
RP> increment a field on the record, and write it back.
RP> It trunciated my file to 0 characters. ... I don't think
RP> ANSI Pascal operates like that, and it doesn't mention it in
RP> the TP docs.
That is standard Pascal behaviour and is fundamental to the language. The
TP docs clearly define the behaviour on p119 under the "ReWrite" procedure
when it says -
"Creates and opens a new file...
...if an external file with same name already exists, it is deleted and
a new empty file is created in its place."
That, to me, would be fairly clear.
If you want to open an existing file for read/write access use reset if it
is a typed or untyped file. Text files cannot be opened in that mode.
TeeCee
TeeCee
--- TC-ED v2.01
* Origin: The Pilbara's Pascal Centre (+61 91 732930) (3:690/644)
* Tossed by SFToss/286 v1.02a on 92/11/25 08:06:04
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 11-23-92 10:45:58
From Mark Ouellet
To David Szkilnyk
Subject Re: DIALOGS NO FRAMES
On 04-Nov-92, you, David Szkilnyk, of 3:634/387.0 wrote...
DS> Is it possible to open a dialog box without a frame. I thought if the
DS> options where set so it didn't include a frame it would not activate
DS> it but that doesn't make sense if in the constructor init's its
DS> descendants thus activating the twindow.frame
David,
TDialog.init calls Twindow.init first. By the time you set Options
not to create a frame, Twindow.init has allready inserted it into the
window's group.
I believe your only solution would be to create your own Dialog object.
Best regards,
Mark Ouellet.
--- Squish v1.01
* Origin: The Sequel to Cramer VS Cramer: TPCramer VS UUencode ;-) (1:240/1.4)
* Tossed by SFToss/286 v1.02a on 92/11/25 08:06:12
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 11-23-92 10:54:31
From Mark Ouellet
To David Webb
Subject Re: OverView of New TP/BP 7
On 18-Nov-92, you, David Webb, of 3:640/943.0 wrote...
DW> Sorry to but in here but are you saying that you can pick up Borland
DW> Pascal 7.0 with Objects on a CD ROM instead of normal media ?
David,
Yes and it can even run from the CD-ROM!!!! You have a couple of
options. You can either install it from the CD-ROM to your hard-disk or
you can run it directly from the CD-ROM in which case you again have a
couple more choices.
One of them is to have only configuration files such as TURBO.DSK (I
guess) written to your hard-disk. Another options lets you install only
time-critical files to your hard-disk, accessing the rest directly on
the CD-ROM.
Richard Nelson mentionned this a few days ago.
Best regards,
Mark Ouellet.
--- Squish v1.01
* Origin: The Sequel to Cramer VS Cramer: TPCramer VS UUencode ;-) (1:240/1.4)
* Tossed by SFToss/286 v1.02a on 92/11/25 08:06:12
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 11-23-92 11:02:36
From Mark Ouellet
To Richard Morris
Subject Re: BORLAND PARADOX ENGINE
On 16-Nov-92, you, Richard Morris, of 3:634/387.0 wrote...
RM> ..... I like being able to query my apps datbase with
RM> Paradox/Object Vision/Quattro, but then what do you expect from
RM> someone working at Borland
Richard,
I take it then that you are working for Borland Canada?!! Could you
do me a favor then, could you manage to have information sent to me
about ALL current Borland products. I really mean everything, screen
blankers, programming tools etc...
I need those info as I can never find a complete list of Borland
products. Even my friend who is in the business doesn't have it all nor
do his suppliers.
I would specialy like info about the new products available like,
sourcerer's apprentice, Screenery, Brief editor etc...
I receive some but it's allways the same stuff or almost. Last one I
received was for Quattro-Pro for Windows. I own Quattro-Pro but never
actually bought it. It was sent to me by error when I ordered my TP 6.0
PRO and I was told to keep it as a gift. To be honest, in the close to
two years I have had it, I never installed it for more than a few days.
I like it, prefer it over Lotus mind you but I just don't have use for
it right now.
Anyways, send me anything you can find to:
Mark Ouellet
1940 Sheppard Street
Sillery,
Province of Quebec, Canada
G1S 1L2
Phone: (418) 527-6669
I'd really appreciate this 'cause I keep seing stuff like Screenery
at Borland shows, keep hearing about how they aquired the rights to
Brief and Sorcerer's apprentice but never actually got a price for it or
even received offers for them.
BTW, I saw a message about the CD-ROM for BP 7.0. Am I correct, I
think what they said was that I could ADD the CD-ROM for only $19 more
and the CD-ROM contains Bug lists and patches OR WAS THAT that you could
get the bug lists and patches added to the CD-ROM for $19??? (Those are
probably US prices!!)
Best regards,
Mark Ouellet.
--- Squish v1.01
* Origin: The Sequel to Cramer VS Cramer: TPCramer VS UUencode ;-) (1:240/1.4)
* Tossed by SFToss/286 v1.02a on 92/11/25 08:06:12
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 11-23-92 11:39:12
From Mark Ouellet
To Tom Lawrence
Subject Re: Name
On 19-Nov-92, you, Tom Lawrence, of 1:153/401.0 wrote...
>> PROGRAM Display_Name;
>> VAR A,B: INTEGER;
^^^^^^^^^^^^^^^^^
>> BEGIN
>> WriteLn ('Enter your name mortal: ');
>> ReadLn (A);
^^^^^^^^^^^
TL> Yes, but you might have your WRITEs and WRITELNs confused. The
TL> program would produce output as follows:
TL>
TL> Enter your name mortal: Tom Lawrence How many times to display your
TL> name mortal? 2 Tom LawrenceTom Lawrence
Say Tom,
is "Tom Lawrence" a positive or a negative integer?? ;-)
Best regards,
Mark Ouellet.
--- Squish v1.01
* Origin: The Sequel to Cramer VS Cramer: TPCramer VS UUencode ;-) (1:240/1.4)
* Tossed by SFToss/286 v1.02a on 92/11/25 08:06:12
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 11-23-92 14:29:15
From Mark Ouellet
To Alex Boisvert
Subject Re: Contest
On 20-Nov-92, you, Alex Boisvert, of 1:257/405.0 wrote...
AB> Hi Mark - I'll be competing against you... so watch closely on your
AB> program's optimization ;-)
AB>
AB> Alex. PS: I haven't submitted my code to Trevor... still making it
AB> better everyday
No problems Alex,
I had completed one version but started on the next version. Right
now I'm waiting for BP 7.0 to come in and working on some other project
in the mean time.
Best regards,
Mark Ouellet.
--- Squish v1.01
* Origin: The Sequel to Cramer VS Cramer: TPCramer VS UUencode ;-) (1:240/1.4)
* Tossed by SFToss/286 v1.02a on 92/11/25 08:06:12
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 11-23-92 14:30:53
From Mark Ouellet
To Trevor Carlsen
Subject Re: Contest
On 20-Nov-92, you, Trevor Carlsen, of 3:690/644.0 wrote...
TC> You're wrong again!
That's what I said ;-)
TC> My program (.EXE only and PKLited with the commercial version) will
TC> be released Nov 30. You can test run it then. Entries will not be
TC> released in any form, binary or source, until after the closing date.
TC>
TC> I do not have any entries as yet and doubt that I will until sometime
TC> in December :-) I have had many indications of intent, both by
TC> netmail and here in the echo.
Well Trevor,
good enough, since your program will be the real contender anyways!!
BTW, from what I heard, BP 7.0 uses that 16Meg adress space mostly as
heap!! How are you going to deal with that?? You said no EMS or XMS but
that heap was allowed, do you intend to limit heap space on your machine
by some mean??
Best regards,
Mark Ouellet.
--- Squish v1.01
* Origin: The Sequel to Cramer VS Cramer: TPCramer VS UUencode ;-) (1:240/1.4)
* Tossed by SFToss/286 v1.02a on 92/11/25 08:06:12
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 11-23-92 14:40:06
From Mark Ouellet
To Tony Wouters
Subject Re: deskjet 500C
On 18-Nov-92, you, Tony Wouters, of 2:291/711.1 wrote...
TW> Hi there,
TW>
TW> Is there someone who can tell me how I can put colored ASCII text to
TW> a DESKJET 500C ?
TW>
TW> It's nice to have a color printer, but not when it doesn't give you
TW> what you want......
Tony,
If you get an answer to this one I'd like to know ;-) I normally use
windows as it is the only environement so far that gives me access to
the full potential of my 500C (BTW, Windows drivers version 3.0 for the
Deskjet 500C are out).
I don't know about you but I'm deceived of HP's manuals for this
printer. The laser jet manuals gave good example on how to program for
the laserjets. With these manuals you don't even get examples of
black&White programming, let alone color!!
Best regards,
Mark Ouellet.
--- Squish v1.01
* Origin: The Sequel to Cramer VS Cramer: TPCramer VS UUencode ;-) (1:240/1.4)
* Tossed by SFToss/286 v1.02a on 92/11/25 08:06:12
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 11-23-92 14:51:07
From Mark Ouellet
To Rick Schaefer
Subject Re: Name
On 19-Nov-92, you, Rick Schaefer, of 1:231/430.0 wrote...
AC>> Will the above program work?
RS> Nope. A is defined as an Integer and you cannot use a readln to get
RS> an integer. It only returns a string.
Rick,
Out of ten you get 5 points for trying and 0 for the answer ;-).
Readln will read integers or any other string, char or ordinal types.
Best regards,
Mark Ouellet.
--- Squish v1.01
* Origin: The Sequel to Cramer VS Cramer: TPCramer VS UUencode ;-) (1:240/1.4)
* Tossed by SFToss/286 v1.02a on 92/11/25 08:06:12
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 11-23-92 15:05:11
From Mark Ouellet
To Trevor Carlsen
Subject Re: Speed wanted !
On 20-Nov-92, you, Trevor Carlsen, of 3:690/644.0 wrote...
TL>> >PD> (variable "svar" is a array[1..400] of string[160])
TL>> > Firstly, svar cannot be a variable defined as you describe above.
TL>> Wrong! If you take the time to multiply it out
TC> Believe it or not I did! Anyway I plead guilty...brain fade.
Hummm.... 400 * 161 > 65519... 0..99 * 100 = 1,000,000... seems like
this contest is going to be a cinch after all ;-)
Best regards,
Mark Ouellet.
--- Squish v1.01
* Origin: The Sequel to Cramer VS Cramer: TPCramer VS UUencode ;-) (1:240/1.4)
* Tossed by SFToss/286 v1.02a on 92/11/25 08:06:12
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 11-23-92 15:08:31
From Mark Ouellet
To Trevor Carlsen
Subject Re: Contest
On 20-Nov-92, you, Trevor Carlsen, of 3:690/644.0 wrote...
TC> My program (.EXE only and PKLited with the commercial version) will
TC> be released Nov 30.
Trevor,
I forgot to ask, it will be posted in PDNPASCAL??? As you might
remember I have problems getting stuff to/from zone 3!!
Best regards,
Mark Ouellet.
--- Squish v1.01
* Origin: The Sequel to Cramer VS Cramer: TPCramer VS UUencode ;-) (1:240/1.4)
* Tossed by SFToss/286 v1.02a on 92/11/25 08:06:12
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 11-23-92 08:11:32
From Dj Murdoch
To J J Marquez
Subject Re: Borland Pascal 7.0
JJ> If you only had 28
JJ> Meg FREE, you couldn't install it all.
I think you could do the installation manually. It would be tedious, but
the files are all described.
The reason you need the extra space is because some of the files are too big
to fit on a single floppy (even when compressed); they're copied to the hard
disk and joined together there before being uncompressed. If you did all
of those first, you'd never need more than 28 megs.
Of course, buying a 28 meg compiler and having no space left to compile things
wouldn't be the best way to spend your money.
--- Msg V3.2
* Origin: Murdoch's_Point - - (1:249/99.5)
* Tossed by SFToss/286 v1.02a on 92/11/25 08:06:38
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 11-23-92 08:16:52
From Dj Murdoch
To Trevor Carlsen
Subject Re: Array of Pointers
TC> Done as I suggested it would not be a problem.
TC> BTW my estimate of an array of pointers method taking up
TC> almost as much as 50% extra memory would be way off the
TC> mark. Assuming you are using TP6 every string[8]
TC> allocated would take 20 bytes - 16 for the string and 4
TC> for the pointer. Makes an array of pointers even less
TC> attractive in this case.
But in reality, you shouldn't use an array of pointers to String[8] - you
should use an array of pointers to String, and use NewStr to allocate them.
Only those that are fully 8 chars long will waste 20 bytes of space; if they
happen to be empty, they'll only take 4 bytes, and anything with a length
from 1 to 7 will take up 12 bytes.
Depending on the application, it might not take much more space than the array
of String[8], and could take less.
One advantage: if every now and then you have one that's 100 bytes long,
it won't cause any trouble. If people who wrote message editors used NewStr,
we wouldn't have all these brain damaged programs that truncate subject lines
to 30 or 40 characters :-).
The only disadvantage of NewStr is that you need a function to get the string
value out of the heap, since using a Nil pointer isn't pretty.
--- Msg V3.2
* Origin: Murdoch's_Point - - (1:249/99.5)
* Tossed by SFToss/286 v1.02a on 92/11/25 08:06:38
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 11-23-92 08:27:28
From Dj Murdoch
To Charles Strusz @ 970/201
Subject Re: Desperate...
CS> We know who wrote it. We have only hearsay evidence,
CS> however. I believe that I once heard that many compilers
CS> insert the serial number of the version used in the .com files.
CS> Is this a fact? Is it possible to view this serial
CS> number, and who is qualified to be a paid professional
CS> expert on such an issue?
The best you can do is to determine which brand and version number of compiler
was used. No compiler that I've ever heard of will put a string identifying
the user into the output. To find the compiler version, just search through
the executable for a copyright string. That works on most of them.
As for finding a paid professional expert, you might want to ask for advice
at a local PC users group. If the damage done is a serious loss of data, don't
use the machine again, but find a good data recovery company. They may also
be willing to testify on your behalf on what they found.
--- Msg V3.2
* Origin: Murdoch's_Point - - (1:249/99.5)
* Tossed by SFToss/286 v1.02a on 92/11/25 08:06:38
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 11-25-92 11:49:01
From Trevor Carlsen
To Kelly Small
Subject Array of Pointers
TC> ...Assuming you are using TP6 ev string[8] allocated would
TC> take 20 bytes - 16 for the string and 4 for the
KS> Why 16 bytes instead of 9 for the string?
Because it is being allocated on the heap.
TP6 reintroduced a heap granularity of 8 as compared to TP4/5x's granularity
of one. I say "reintroduced" because in reality it was returning to the old
TP3 method of heap management by so doing.
A granularity of 8 means that memory is always allocated in multiples of 8
bytes, hence a 9 byte variable such as string[8] would have 16 bytes allocated
for it thus wasting 7 bytes.
You might be tempted to think that this was a step backwards, however as with
most programming design decisions, it represents a compromise. If every byte
counts it is not so good, but if heap fragmentation is a problem it is a big
improvement. I take the view that it was a good step as one can always implemen
their own heap management technique if the need is there for it.
TeeCee
--- TC-ED v2.01
* Origin: The Pilbara's Pascal Centre (+61 91 732930) (3:690/644)
* Tossed by SFToss/286 v1.02a on 92/11/26 10:21:44
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 11-25-92 12:01:58
From Trevor Carlsen
To Aaron Marasco
Subject Hiding the cursor
AM> MC> --- FMail 0.92
AM> MC> * Origin: Don't let the wave drown you (1:2410/339)
AM>
AM> Could you repost these for me? It'll be greatly appreciated!
Code is not to be reposted just because you missed it. Arrange for the private
exchange of the code (on YOUR dollar) by netmail.
Also please do not quote entire messages including origin and tear lines.
Have some consideration for those paying the bills.
If you wish to reply to this message do so by NETMAIL ONLY.
Moderator.
--- TC-ED v2.01
* Origin: The Pilbara's Pascal Centre (+61 91 732930) (3:690/644)
* Tossed by SFToss/286 v1.02a on 92/11/26 10:21:44
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 11-25-92 12:10:31
From Trevor Carlsen
To Dave Jarvis
Subject replace a record
DJ> Actually, in Pascal, as far as I know with records, there
DJ> isn't a really easy way to replace a record, even after
DJ> appention.
If you are referring to standard Pascal then you are correct. With Turbo Pascal
it is totally incorrect. Even Pascals that claim to be virtually standard
implementations (such as VAX) have the means to read and write to individual
records as a language enhancement. Its called random access.
Look up seek, read, write, reset, BlockRead, BlockWrite in your documentation.
TeeCee
--- TC-ED v2.01
* Origin: The Pilbara's Pascal Centre (+61 91 732930) (3:690/644)
* Tossed by SFToss/286 v1.02a on 92/11/26 10:21:44
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 11-25-92 12:18:28
From Trevor Carlsen
To Gregory P. Smith
Subject Reset and ReWrite TP6.0 Style?
GS> (After you open it for append you can use Seek to get back
GS> into the middle of the file I believe).
Seek cannot be used on text files. Append can only be used on text files.
TeeCee
--- TC-ED v2.01
* Origin: The Pilbara's Pascal Centre (+61 91 732930) (3:690/644)
* Tossed by SFToss/286 v1.02a on 92/11/26 10:21:44
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 11-25-92 19:49:19
From Trevor Carlsen
To Sean Ocker
Subject strings
SO> What is the 4th character of the third line of text
SO> in a text file?
If you read the line into a string variable called st then the 4th character
in that line is st[4].
SO> or: Please reverse this string: TODAY
SO> output should be YADOT
var
st,
RevStr : string;
st := 'TODAY';
for x := length(st) downto 0 do
RevStr[length(st)-x] := st[x];
SO> I need to know how to setup ANYTHING for a string. How to
SO> take a number and both use it as a number for calculations
SO> and a string for string manipulation.
To convert a string to a number look up Val in your manual.
To convert a number to a string look up Str in your manual.
TeeCee
--- TC-ED v2.01
* Origin: The Pilbara's Pascal Centre (+61 91 732930) (3:690/644)
* Tossed by SFToss/286 v1.02a on 92/11/26 10:21:44
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 11-25-92 00:00:00
From Terry Hughes
To Wayel Alwohaibi @ 925/60
Subject *PRO upgrades
WA>TH>If you want to use OPRO in protected mode programs and you're not on the
WA>TH>Fast Update Plan you'll need to purchase an update for $49. If you
WA> I thought the protected mode implementation was left up to the
WA>PM compiler, i.e. if it runs in real mode it will run in PM when
WA>compiled under PM, no? If not, what sort of differences do you have to
WA>do in writing PM code?
Here are a few of the things that come to mind (from porting APRO and
OPRO):
References to real memory addresses (like BiosTics : ^LongInt;
absolute $40:$6C; or Mem[X:X]) must be changed to use selectors that the
RTL provides or that you provide.
References to real addresses returned by DOS or BIOS function calls,
obtained from the PSP or DOS MCB chain must be done through selectors
that you allocate and manage.
Usage of segment registers in BASM or external assembly language
routines must be limited to valid selectors (i.e., can't use segment
registers as general purpose registers).
These are the easy ones. Where it gets a bit difficult is understanding
what different DPMI servers will do for different function calls. In
many cases you can't depend on all DPMI servers to virtualize the
same functions the same way. So, you end up needing to call the DPMI
server yourself to simulate some real mode interrupts. And the only way
to figure out what you need is by testing these functions under the
various DPMI servers.
Other issues include your treatment of heap (much bigger), EMS and XMS
(now superfluous), overlays (now unnecessary), exec swapping, TSRs and
so on. All of these things either require different treatment or are no
longer the best way of doing things under protected mode.
And of course, there's always the "latent bug exposure". There were some
things you could always get away with in real mode that you can't get
away with in pmode. For example, under real mode it was always safe to
dereference a pointer immediately after disposing it (poor programming,
but it would always work). Under protected mode this will generate a
GPF.
Obviously, many of these low-level issues affect us, as library vendors,
worse then they affect an applications programmer. We spent a lot of
time converting and testing our libraries under various DPMI servers so,
hopefully, you won't have to deal with too many of these issues
yourself.
-Terry
___
X QMPro 1.0 41-2187 X TurboPower Software (voice 719-260-9726)
--- Maximus 2.01wb
* Origin: The Programmers Playhouse (1:128/60)
* Tossed by SFToss/286 v1.02a on 92/11/27 23:23:03
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 11-26-92 06:03:34
From Trevor Carlsen
To Frank Masingill
Subject TP7??
FM> ...More importantly, I'd value your opinion about whether I
FM> should now upgrade to BP 7.0. ...A good many others at my
FM> level might value your opinion on this (or at least some
FM> comments pro and con) if you care to give them.
As I have not yet received my copy (Oz is low on the Borland priority scale),
I'll delay any comment. I noticed today that another Oz user has his TP7
so I guess that RSN I may have mine.
TeeCee
--- TC-ED v2.01
* Origin: The Pilbara's Pascal Centre (+61 91 732930) (3:690/644)
* Tossed by SFToss/286 v1.02a on 92/11/27 23:23:10
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 11-26-92 06:28:42
From Trevor Carlsen
To Mark Ouellet
Subject Re: Contest
MO> BTW, from what I heard, BP 7.0 uses that 16Meg adress space
MO> mostly as heap!! How are you going to deal with that?? You
MO> said no EMS or XMS but that heap was allowed, do you intend
MO> to limit heap space on your machine by some mean??
No.
disqualified := not ProgramRunsOKon8088XT;
TeeCee
--- TC-ED v2.01
* Origin: The Pilbara's Pascal Centre (+61 91 732930) (3:690/644)
* Tossed by SFToss/286 v1.02a on 92/11/27 23:23:10
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 11-26-92 06:36:26
From Trevor Carlsen
To Sean Ocker
Subject strings
SO> or: Please reverse this string: TODAY
SO> output should be YADOT
My previous example was wrong and I'm sure that about 1000 messages pointing
out that I was in error in my hasty example to you on the above are about
to issue into the net! :-(
Here is a workable way -
function ReverseStr(st: string): string
var x : byte;
begin
ReverseStr[0] := st[0];
for x := length(st) downto 1 do
ReverseStr[succ(length(st) - x)] := st[x];
end;
TeeCee
--- TC-ED v2.01
* Origin: The Pilbara's Pascal Centre (+61 91 732930) (3:690/644)
* Tossed by SFToss/286 v1.02a on 92/11/27 23:23:10
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 11-26-92 06:44:20
From Trevor Carlsen
To Chet Kress
Subject Print-Screen Disable!
CK> Does anyone have any code to disable the Print-Screen
CK> Key?...I would appreciate two procedures with some inline
CK> code. One to disable the print-screen key and the other to
CK> re-enable it again...
No inline as requested as it is unnnecessary but the following should work.
uses dos;
var
OldInt5 : pointer;
procedure NewInt5; interrupt; far;
begin
{ deliberately empty procedure }
end;
procedure DisableInt5;
begin
GetIntVec($05,OldInt5);
SetIntVec($05,@NewInt5);
end;
procedure EnableInt5;
begin
SetIntVec($05,OldInt5);
end;
TeeCee
--- TC-ED v2.01
* Origin: The Pilbara's Pascal Centre (+61 91 732930) (3:690/644)
* Tossed by SFToss/286 v1.02a on 92/11/27 23:23:10
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 11-26-92 07:46:02
From Trevor Carlsen
To Stewart Bird
Subject findfirst help
SB> I have been trying to do a tree program and I want to
SB> isolate the directories, from ordinary files. I can exchange
SB> the varible 'anyfile' with 'directory' and I still get the
SB> same results. If I have a directory of files, and
SB> subdirectories, it prints them all. What is the sense of
SB> having the 'anyfile or directory' varible. I guess I could
SB> use the getfattr procedure, but that varible must have a
SB> reason, and I'm missing it.}
The FindFirst/FindNext procedures returns details of any file that has the
specified bit set in the attribute byte PLUS any normal file. So if you specify
the directory attribute, all directories will be listed PLUS all normal files.
This means that you have to test after each call to see if the directory bit
is set or not. Do this by -
if (DirInfo.attr and Directory) = Directory then
It is a directory
TeeCee
--- TC-ED v2.01
* Origin: The Pilbara's Pascal Centre (+61 91 732930) (3:690/644)
* Tossed by SFToss/286 v1.02a on 92/11/27 23:23:10
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 11-26-92 07:47:18
From Trevor Carlsen
To Peter Beeftink
Subject findfirst help
PB> You can use the variable Dirinfo.attr to weed out
PB> directories. Directories have Dirinfo.attr=16.
Whilst that may correct some of the time, it will not be correct all of the
time.
A directory will always have bit 4 set of the attribute byte. There is nothing
that says other bits cannot also be set so if you test in that way some director
es may be overlooked.
Better is
if (DirInfo.attr and Directory) = Directory then
You can be sure that you have not missed any directory.
TeeCee
--- TC-ED v2.01
* Origin: The Pilbara's Pascal Centre (+61 91 732930) (3:690/644)
* Tossed by SFToss/286 v1.02a on 92/11/27 23:23:10
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 11-26-92 07:49:05
From Trevor Carlsen
To Bob Swart
Subject MAKESTR (for contest)
BS> What I meant was: can the strings contain OTHER
BS> characters than 'a'..'z' and 'A'..'Z'
No
function MakeRndStr: string;
var x : byte;
t : string;
sa: array[0..255] of byte absolute t;
l : byte absolute t;
begin
l := 3 + random(28);
for x := 1 to l do
sa[x] := 65 + random(26) + (random(2) shl 5);
MakeRndStr := t;
end;
BS> Did any contenders already enter the contest?
No
BS> ... How can we get your benchmark? (UUENCODED ??)
It will be placed in PDN.
TeeCee
--- TC-ED v2.01
* Origin: The Pilbara's Pascal Centre (+61 91 732930) (3:690/644)
* Tossed by SFToss/286 v1.02a on 92/11/27 23:23:10
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 11-24-92 07:56:55
From Dj Murdoch
To Jakob Paikin
Subject Re: Borland Pascal
DM> Not quite complete - the overlay manager and the
JP> coprocessor emulator are
DM> supplied in .OBJ form.
JP> Thats true - but understandable... Borland don't want us
JP> to know their internal goodies :-)
No, not really understandable. A run-time library is all internal goodies,
isn't it?
There are two problems with having these parts missing. First, the coprocessor
emulator in TP 6 was buggy - it wasn't really safe to use for serious calculatio
s. I don't know if these bugs were fixed or not. Second, I'd like to remove
some of the limitations of the emulator and the overlay manager, but it's
much harder without having the source code. For example, the overlay manager
still can't cache overlays in XMS memory. That would be really easy to add,
but it's not really safe to do low level work with an undocumented interface.
I suspect the reason these parts are missing is that they weren't written
at Borland. Borland licensed them from someone, and didn't buy the right
to distribute them in source code.
--- Msg V3.2
* Origin: Murdoch's_Point - - (1:249/99.5)
* Tossed by SFToss/286 v1.02a on 92/11/27 23:23:19
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 11-24-92 08:09:38
From Dj Murdoch
To Jakob Paikin
Subject Re: Second bug in TP7/BP7 :-)
JP> Just found the following change from TP6 to BP7:
JP> In TP6 Pos('',S) returned 1 (That is: The empty string was
JP> contained in everystring).
JP> In BP7 Pos('',S) returns 0 (That is: The empty string is
JP> NOT contained in any string).
In fact, the two releases of TP 6 were inconsistent about this. BP7 agrees
with TP 6.01.
I find it hard to call either of these a bug: it doesn't make sense to search
for an empty string, and the manual's definition of Pos doesn't define how
it should behave in this case. I'd say it's an error on your part to call
Pos with an empty string.
--- Msg V3.2
* Origin: Murdoch's_Point - - (1:249/99.5)
* Tossed by SFToss/286 v1.02a on 92/11/27 23:23:19
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 11-25-92 08:17:36
From Dj Murdoch
To David Webb
Subject Re: TP7
DW> I must admit that I'm not too happy with Borland for
DW> not announcing the release of their BP7.0 product earlier,
DW> especially when I, only just over a month ago, purchased
DW> an upgrade from TP5.5 to TP6.0.
I don't know the Australian policy (nor do I speak for Borland), but in North
America you'd get the TP7 upgrade for free. I've heard conflicting reports
about whether you get the BP7 upgrade at a better price or not.
--- Msg V3.2
* Origin: Murdoch's_Point - - (1:249/99.5)
* Tossed by SFToss/286 v1.02a on 92/11/28 08:04:37
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 11-25-92 01:30:50
From Mark Ouellet
To Trevor Carlsen
Subject Re: Checking file types
On 22-Nov-92, you, Trevor Carlsen, of 3:690/644.0 wrote...
Trevor,
I knew you loved Pascal but.... ;-)
TC> No there is not. Try this (untested)...
TC> function PrintableFile(fname: PathStr): boolean;
TC> var
TC> dir : DirStr;
TC> name : NameStr;
TC> ext : ExtStr;
TC> begin
TC> FSplit(fname,dir,name,ext);
TC> if ext[0] <> #0 then
TC> PrintableFile := (pos(ext,'.OBJ.COM.EXE') = 0);
^^ ^
^ No ";" allowed
^ before an
^ else.
^
^ Program will flag "C"
source files as not printable
files.
TC> else
TC> PrintableFile := true;
TC> end;
Best regards,
Mark Ouellet.
--- Squish v1.01
* Origin: The Sequel to Cramer VS Cramer: TPCramer VS UUencode ;-) (1:240/1.4)
* Tossed by SFToss/286 v1.02a on 92/11/28 08:05:07
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 11-26-92 07:51:19
From Mark Ouellet
To Adam Kolodziejczak
Subject Re: Borland Pascal
On 21-Nov-92, you, Adam Kolodziejczak, of 1:153/763.0 wrote...
AK> If you guys want 32 bit instructions now, why not study a bit of ASM?
AK> I studied it, and the speed is AWESOME... it includes all instructions
AK> from the 86 to the 486 to the 487... it is real neat. And you just
AK> include the code to speed up the critical parts of the program.
Sure Adam,
we can allways code the time critical stuff in assembler but I
really can't wait for the day when a compiler produces better code than
hand coded and optimized assembler. Then, we'll really be able to say
"There's an optimizing compiler!!"
Everybody prefers a high level language because it's easier to code.
Even Assembler fanatics can't honestly say they wouldn't prefer it!! I
call those who do liars, after all, why do they use MACRO assemblers
then, if not to make the task simpler. Isn't their idea of using
Macro-Assemblers and Macro libraries aimed towards that goal.
I believe when Compilers produce that good a code, we'll probably
see a lot less assembler fanatics.
From that aspect, a Borland Pascal that will produce 32bit code, not
only math operations, will be wellcomed by everyone. I heard they were
working on a 32bit version, I sure hope we can see it for BP 7.5 or 8.0
Best regards,
Mark Ouellet.
--- Squish v1.01
* Origin: The Sequel to Cramer VS Cramer: TPCramer VS UUencode ;-) (1:240/1.4)
* Tossed by SFToss/286 v1.02a on 92/11/28 08:05:07
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 11-26-92 07:59:47
From Mark Ouellet
To Colin Jones
Subject Re: TURBO C++
On 21-Nov-92, you, Colin Jones, of 1:153/734.0 wrote...
CJ> I just got Turbo C++(Borland) and I have only had experience in
CJ> GWBasic...which makes it kind of dificult to understand...if anyone
CJ> has knowlage about C++ or knows which are the best books to
CJ> buy...could you leave me a message...Thanks Colin Jones
Colin,
If you left your message in a C++ echo instead of a Pascal echo
you'd stand a better chance of getting an answer. C++ is OFF-TOPIC here,
but there is a C++ echo available on Fidonet. Ask your sysop if he has
it or if he can get it for you.
Best regards,
Mark Ouellet.
--- Squish v1.01
* Origin: The Sequel to Cramer VS Cramer: TPCramer VS UUencode ;-) (1:240/1.4)
* Tossed by SFToss/286 v1.02a on 92/11/28 08:05:07
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 11-26-92 08:09:26
From Mark Ouellet
To Mike Copeland
Subject Re: Array of Pointers
On 21-Nov-92, you, Mike Copeland, of 1:114/18.10 wrote...
MC> const LIM = 10000; type STR8 = string[8]; DPTR = array[1..LIM] of
MC> ^STR8; var KELLY : DPTR;
MC>
MC> begin New (KELLY); { acquire data space } KELLY^[1] := 'Mikey';
MC> or....
MC> var KELLY : array[1..LIM] of ^STR8; I : Word;
MC> begin for I := 1 to LIM do New (KELLY[I]); KELLY[1]^ := 'Mikey';
MC>
Mike,
Actually, it's not one or the other!! Only your second example is
correct. Kelly is an Array of pointers, not a pointer to an Array, so
"new(Kelly)" is incorrect.
Best regards,
Mark Ouellet.
--- Squish v1.01
* Origin: The Sequel to Cramer VS Cramer: TPCramer VS UUencode ;-) (1:240/1.4)
* Tossed by SFToss/286 v1.02a on 92/11/28 08:05:08
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 11-26-92 08:12:38
From Mark Ouellet
To Mike Copeland
Subject Re: Smart Linking (???)
On 22-Nov-92, you, Mike Copeland, of 1:114/18.10 wrote...
MC> I have often answered queries here about the benefits and uses of TP
MC> Smart Linking - but I have uncovered a real problem! Using a global
MC> data Unit, which has (previously) contained hundreds of variables used
MC> by many different programs - under a single Var declaration...things
MC> were fine. Then, I decided to "optimize" my system a bit, by taking
MC> better advantage of S/L. I went through this Unit, and I inserted a
MC> "Var" in front of every variable in this large global list of
MC> variables - and my main program (the one I wanted to get most benefit)
MC> grew 14K!!! Nothing else done to the program! (It _should_ have had
MC> the opposite effect, right?) Note that the .EXE grew about 700 bytes -
MC> but the Data represented on the .MAP file grew 14K.... Any thoughts?
Mike,
Have you tried turning Debug info OFF. It seems to me the increase
in size of the .MAP is normal as MORE SYMBOLS are now created since each
variable is now a seperate block. The increase in the .EXE is probably
caused by this too. If you TDSTRIP it you will probably find that it is
not any larger than before. All those 700 bytes are is the info for
those variables now generating more symbols. The difference from 14K to
700 bytes is that the .MAP contains ALL the symbols from ALL Units,
program files etc... while the .EXE debug info only contains symbols
that were actually included by the linker.
Please try it and tell me if I hit the spot, as I wanted to start
taking advantage of Smart/linking myself and don't think it will affect
the end result size-wise. But if you prove me wrong, then....
Best regards,
Mark Ouellet.
--- Squish v1.01
* Origin: The Sequel to Cramer VS Cramer: TPCramer VS UUencode ;-) (1:240/1.4)
* Tossed by SFToss/286 v1.02a on 92/11/28 08:05:08
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 11-26-92 08:25:33
From Mark Ouellet
To Jeff Cook @ 970/1
Subject Re: Borland Pascal?
On 16-Nov-92, you, Jeff Cook @ 970/1, of 1:10/8.0 wrote...
JC> I have TP 6.0... where is 7.0 out and what is this Borland Pascal....
JC> where do they sell it.... ooops maybe I'd know if I had sent in my
JC> registration form.... ahh well!
Jeff,
Yes Turbo Pascal 7.0 is out. But there is now a name-change in
effect. They now use the same naming conventions they introduced with
Borland C++ if you know about that.
Basically it's like this:
1- There is no PRO version anymore, or rather it's not called that
anymore.
2- It's Now called "Borland Pascal with Objects 7.0" and the other
one is "Turbo Pascal 7.0" or maybe "Turbo Pascal with Objects
7.0", I'm not sure about that one as I got the BP 7.0 version.
BTW, From here on, I'll refer to "Borland Pascal with Objects 7.0" as
BPWO and "Turbo Pascal 7.0" as TP7.
3- BPWO includes Assembler, Debugger, Profiler and a full line of
Windows tools as well as Windows version of the Debugger etc...
You can think of this one as the new "PRO" version. This one
includes everything but it's huge.
4- TP7 does not contain Assembler or Debugger etc... This is the
small version and can not compile to anything BUT DOS.
5- BPWO can now compile for
DOS real mode
DOS protected mode
Windows
6- BPWO includes, 5 different versions of the compiler:
#1 BP.exe runs in DOS Protected mode. Requires 286 or
better. Can compile for DOS, DOS protected or windows.
This one is an IDE (ie: Integrated Devellopement
Environement, Long term to mean, Interractive Editor,
Debugger etc...)
#2 BPW.exe same as BP.exe except this one runs under
windows.
#3 Turbo.exe, IDE, runs in DOS real mode compiles for DOS
real mode only. (This one is said to still run on XT I
think)
#4 BPC.exe command-line version of the Protected mode
compiler. (ie: same functionnalaty as BP.exe except not
an IDE)
#5 TPC.exe command-line version of Turbo.exe.
7- BPWO also include FULL SOURCE to Turbo Vision, Runtime Library
and Object Windows library (OWL)
8- BPWO will use 32bit Math instructions if it detects a 386 or 486
for optimized math operation.
9- Both products, ie TP7 & BPWO's IDEs now have Syntax Color
Highlighting. So you wont get anymore errors from comments you
forgot to close, because now you will instantly notice that your
code has taken the color or comments !!!!
Note that BPWO is huge if you install everything but, I have never seen
an Install program with so much options. You can literally specify very
precisely WHAT you want installed. Which makes it easy to limit the
necessary disk space.
BTW, TP7 and BPWO now support Null-terminated strings like "C". Which
means you can now have strings 64K in size.
I have only had it for a few hours, BPWO that is, and I'm allready in
love with it. It's great, even the ONLINE-HELP can now include YOUR OWN
HELP. Yes!!! You can now compile your own help to include it with the
online help system. This means you can compile Turbo Power's help files
to include them ONLINE or any other help file you normally need while
programming and have it available inside turbo. That also means that
Turbo's HELP Hot-Key (CTRL-F1) will bring you help of YOUR functions,
not only Borland's. Note that some help files might need a little work
to be included and work correctly but it can NOW be done. I don't know
about you but I definitly prefer a "It can be done with work" than a "No
it can't be done at all".
Almost forgot, Turbo vision is now upgraded to Version 2.0 with this
release and the manual is 1 inch think just for Turbo Vision. It also
has new functions added or changed.
Best regards,
Mark Ouellet.
--- Squish v1.01
* Origin: The Sequel to Cramer VS Cramer: TPCramer VS UUencode ;-) (1:240/1.4)
* Tossed by SFToss/286 v1.02a on 92/11/28 08:05:08
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 11-26-92 08:57:54
From Mark Ouellet
To Jeff Cook @ 970/1
Subject Re: Borland Pascal?
On 16-Nov-92, you, Jeff Cook @ 970/1, of 1:10/8.0 wrote...
JC> I have TP 6.0... where is 7.0 out and what is this Borland Pascal....
JC> where do they sell it.... ooops maybe I'd know if I had sent in my
JC> registration form.... ahh well!
OOPS, sorry Jeff,
I forgot... You can order your upgrade directly from Borland. But if
you are a student I suggest you mention it to see if there is a special
pricing available to you. You will probably have to buy it through your
School in that case though. Also, I think the Educationnal program only
refers to TP7, not BPWO. It makes sens, after if you are a student then
BPWO is really seen as the Professionnal programmer's version.
Anyways, if you need to call Borland to upgrade then the number is:
for the USA: 1-800-331-0877, extension 5017
for Canada: 1-800-461-3327
Best regards,
Mark Ouellet.
--- Squish v1.01
* Origin: The Sequel to Cramer VS Cramer: TPCramer VS UUencode ;-) (1:240/1.4)
* Tossed by SFToss/286 v1.02a on 92/11/28 08:05:08
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 11-26-92 09:04:26
From Mark Ouellet
To Paul West
Subject Re: OverView of New TP/BP 7
On 21-Nov-92, you, Paul West, of 1:343/27.0 wrote...
PW> Yes! Thats how I have ordered it (Assuming it ever arrives).
Paul,
I recieved my BPWO 7.0 yesterday. I ordered it on normal media but
I'm in Canada. US residents have been posting here for a few days saying
they had received their version but Borland Canada was not yet shipping
yet when I last called last week. So if the fact I received mine is any
indication, I'd say yours is probably on it's way right now. Unless they
have more delays for CD-ROMs. Borland, as many other software
manufacturers, deal with third parties for disks & CD-ROM duplications
as well as Manual printing.
Best regards,
Mark Ouellet.
--- Squish v1.01
* Origin: The Sequel to Cramer VS Cramer: TPCramer VS UUencode ;-) (1:240/1.4)
* Tossed by SFToss/286 v1.02a on 92/11/28 08:05:08
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 11-26-92 09:10:42
From Mark Ouellet
To Stephen Carpenter
Subject Re: Turbo Vision menus
On 22-Nov-92, you, Stephen Carpenter, of 1:343/27.0 wrote...
SC> Hi Y'all I am writing a turbo vision program in which I would like the
SC> menubar to change when certian options are chosen from the first
SC> menubar. I have done something basically like this:
SC> this doesn't seem to work. What does?
Stephen,
I suggest you take a look at Neil J. Rubenking's "Turbo Pascal 6.0
Techniques and Utilities". It's published by Ziff Davis (you know,
PC-Magazine?!) ISBN number is 1-56276-010-6, price is 39.95 $US, 49.95
$Can or 36.95 pounds for the U.K.
In there Neil shows exactly how to do this. His example is that of a
Multi-Lingual menu. The user can chose between French, English or
Spanish menus.
You should really give this book a look, unless you prefer to wait
'till he gets a Turbo Pascal 7.0 version out. In any case this book
contains many other nice tricks. It's one of the really good TP books
around.
Best regards,
Mark Ouellet.
--- Squish v1.01
* Origin: The Sequel to Cramer VS Cramer: TPCramer VS UUencode ;-) (1:240/1.4)
* Tossed by SFToss/286 v1.02a on 92/11/28 08:05:08
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 11-26-92 09:18:13
From Mark Ouellet
To Kelly Small
Subject Re: Array of Pointers
On 22-Nov-92, you, Kelly Small, of 1:114/36.0 wrote...
KS> In a message to KELLY SMALL, MIKE COPELAND says:
KS>
MC>> const LIM = 10000;
MC>> type STR8 = string[8];
MC>> DPTR = array[1..LIM] of ^STR8;
MC>> var KELLY : DPTR;
MC>>
MC>> begin
MC>> New (KELLY); { acquire data space }
MC>> KELLY^[1] := 'Mikey';
KS> This first method didn't compile but is similar to what I tried to do.
KS> 'kelly' isn't a pointer type and won't work with New. If I change the
KS> var declaration to 'kelly : ^dptr' then it will compile but won't
KS> allocate the correct amount of heap space. The 2nd method with the
KS> For loop will allocate the string space on the heap, but I wonder if
KS> there's a way for the first method to do so?
Kelly,
Yes you can, by combining the two methods like this:
Make Kelly a Pointer to DPTR like you said but remember you now have
to new BOTH times like this:
Kelly : ^Dptr;
New(Kelly); {Allocate space on the heap for the array itself}
{ This way it won't waste valuable space in your data segment}
for x := 1 to LIM do {Alloc space for each string}
new(Kelly^[x]);
And refer to them this way:
Kelly^[ 10 ]^ := 'Mickey';
Remember:
Kelly is the adress of our array.
Kelly^ is the array itself.
Kelly^[ 10 ] is the 10th adress in our array.
Kelly^[ 10 ]^ is the string pointed to by the tenth adress in
our array.
Best regards,
Mark Ouellet.
--- Squish v1.01
* Origin: The Sequel to Cramer VS Cramer: TPCramer VS UUencode ;-) (1:240/1.4)
* Tossed by SFToss/286 v1.02a on 92/11/28 08:05:08
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 11-26-92 09:38:42
From Mark Ouellet
To Joseph Tomaras
Subject Re: my program
On 21-Nov-92, you, Joseph Tomaras, of 1:3609/9.0 wrote...
JT> procedure addnum(var num:number;num1,num2:number);
JT> var rep,carov:shortint;
JT> begin
JT> for rep:=100 downto 1 do
JT> begin
JT> num[rep]:=num1[rep]+num2[rep]+carov;
JT> carov:=0;
One problem I see here Joseph, is that you didn't initialise carov
before the loop so it's value is UNDEFINED on the first pass through the
loop. Which means it can have any value, basically it will have the
value of what ever was in memory before the compiler put carov there.
Same problem in StrechFold, NUM1 is not initialised before you call
negnum with it.
Best regards,
Mark Ouellet.
--- Squish v1.01
* Origin: The Sequel to Cramer VS Cramer: TPCramer VS UUencode ;-) (1:240/1.4)
* Tossed by SFToss/286 v1.02a on 92/11/28 08:05:08
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 11-26-92 09:47:36
From Mark Ouellet
To Rob Addie
Subject Re: High-speed modems
On 22-Nov-92, you, Rob Addie, of 1:140/81.0 wrote...
RA> I have been away from Pascal for a number of months now, and I have hit
RA> the same stumbling block that I did before I put Pascal aside. I am
RA> having trouble with my modem routines that USED to work perfect at 2400
RA> baud. But now, I have a 9600 v32 modem, and my once perfect routines
RA> are not up to snuff. I have absolutely no documentation for locked
RA> baud rates (how to lock them and how to unlock them). Has there been a
RA> revision to the FOSSIL standard? Or where might I find something that
RA> would help me out? If it really is a simple concept, I'd appreciate
RA> some help here in this echo. I really need help!
Rob,
Basically in NON-LOCKED mode, the modem simply outputs that connect
speed as the last thing before changing speed itself to match that of
the remote modem. That is because it expects you to change the comm port
speed to match that of the remote and of your own modem because it is
also now running at that speed and needs to be accessed at that speed.
I'd say, running LOCKED-baud is a lot easier... Basically you ignore
the connect speed message because your modem will also ignore it and
continue to run at the same speed between you and it. It will however
change the speed it uses between itself and the remote but that is
transparent to you.
So basically in LOCKED-BAUD, you really have nothing more to do
except handle the extra speed your 9600 is now giving you. In fact you
do less because now you don't have to bother about changing the comm
port's speed to match that of your modem.
If your routines can allready handle 19200 or 38400, which is
probably one of the speeds you locked your modem at, then you have
nothing to worry about. If however you problem IS that you can't handle
19200 or 38400 then there are async libraries available in shareware as
well as commercial ones like Turbo Power's.
Best regards,
Mark Ouellet.
--- Squish v1.01
* Origin: The Sequel to Cramer VS Cramer: TPCramer VS UUencode ;-) (1:240/1.4)
* Tossed by SFToss/286 v1.02a on 92/11/28 08:05:08
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 11-26-92 10:05:43
From Mark Ouellet
To Anthony Vivona
Subject Re: question
On 21-Nov-92, you, Anthony Vivona, of 1:107/236.0 wrote...
AV> To everyone,
AV> Does anybody know how to run a dos program from within my
AV> pascal program ??
Anthony,
Check out the "EXEC" procedure in your manual.
Best regards,
Mark Ouellet.
--- Squish v1.01
* Origin: The Sequel to Cramer VS Cramer: TPCramer VS UUencode ;-) (1:240/1.4)
* Tossed by SFToss/286 v1.02a on 92/11/28 08:05:08
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 11-26-92 10:09:50
From Mark Ouellet
To Robert Jambor
Subject Re: Speed wanted !
On 19-Nov-92, you, Robert Jambor, of 3:640/521.64 wrote...
RJ> 65520 being the largest data structure allowed.
Robert,
Actually, 64K or 65536 bytes or array [0..65535] of byte IS the
largest allowed.
65520 is the largest data structure SAFE to use. The reason is that
offsets will vary from 0 to F in normalized pointers. And since you
can't be sure that your structure will be created at offset 0 then any
value above 65520 bytes risks wrap-around when you try to access the
last elements.
Best regards,
Mark Ouellet.
--- Squish v1.01
* Origin: The Sequel to Cramer VS Cramer: TPCramer VS UUencode ;-) (1:240/1.4)
* Tossed by SFToss/286 v1.02a on 92/11/28 08:05:08
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 11-26-92 10:15:21
From Mark Ouellet
To Trevor Carlsen
Subject Re: Array of Pointers
On 23-Nov-92, you, Trevor Carlsen, of 3:690/644.0 wrote...
TC> BTW my estimate of an array of pointers method taking up almost as much
TC> as 50% extra memory would be way off the mark. Assuming you are using
TC> TP6 every string[8] allocated would take 20 bytes - 16 for the string
TC> and 4 for the pointer. Makes an array of pointers even less attractive
TC> in this case.
TeeCee,
you meant 13 right?? 9 for the String[8] and 4 for the pointer for a
total of 13?!!
Best regards,
Mark Ouellet.
--- Squish v1.01
* Origin: The Sequel to Cramer VS Cramer: TPCramer VS UUencode ;-) (1:240/1.4)
* Tossed by SFToss/286 v1.02a on 92/11/28 08:05:09
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 11-26-92 10:20:39
From Mark Ouellet
To Trevor Carlsen
Subject Re: Checking file types
On 23-Nov-92, you, Trevor Carlsen, of 3:690/644.0 wrote...
DJ>> IF (Pos( 'COM', Ext ) = 0) AND (Pos( 'EXE', Ext ) = 0) AND
DJ>> (Pos( 'OBJ', Ext ) = 0) THEN
TC> for the above statement it is better to -
TC> if not (pos(ext,'.COM.EXE.OBJ') = 0) then
TeeCee
you really hate ".C" files that much?? ;-)
Best regards,
Mark Ouellet.
--- Squish v1.01
* Origin: The Sequel to Cramer VS Cramer: TPCramer VS UUencode ;-) (1:240/1.4)
* Tossed by SFToss/286 v1.02a on 92/11/28 08:05:09
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 11-26-92 10:30:06
From Mark Ouellet
To Dave Jarvis
Subject Re: replace a record
On 23-Nov-92, you, Dave Jarvis, of 1:249/128.0 wrote...
DJ> Actually, in Pascal, as far as I know with records, there isn't a really
DJ> easy way to replace a record, even after appention.
DJ>
DJ> The algorythm to replace a record goes something like:
DJ>
DJ> 1) Open a temporary file for write (file 2)
<rest deleted>
Dave,
He's talking of a file of records. With random access files there is
no need for what you describe. At least not for REPLACING a record with
some other data. If he wanted to DELETE a record than that would be
another story. It can be easy or it can be hard, it all depends if you
need to PHYSICALLY remove the record or just mark it as being deleted.
But again, for what he wanted, all he has to do is seek to the
particular record he wants to replace and write out the new info.
Best regards,
Mark Ouellet.
--- Squish v1.01
* Origin: The Sequel to Cramer VS Cramer: TPCramer VS UUencode ;-) (1:240/1.4)
* Tossed by SFToss/286 v1.02a on 92/11/28 08:05:09
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Conference 4
Date 11-26-92 10:39:11
From Mark Ouellet
To Stewart Bird
Subject Re: findfirst help
On 23-Nov-92, you, Stewart Bird, of 1:247/101.0 wrote...
SB> { Can anyone help.
SB> I have been trying to do a tree program and I want to
SB> isolate the directories, from ordinary files. I can exchange the
SB> varible
SB> 'anyfile' with 'directory' and I still get the same results. If I have
SB> a
SB> directory of files, and subdirectories, it prints them all. What is the
SB> sense of having the 'anyfile or directory' varible. I guess I could use
SB> the getfattr procedure, but that varible must have a reason, and I'm
SB> missing it.}
Stewart,
First of all, the Directory and AnyFile bit is not Borland's Fault,
It's Microsoft's RETARDED way of doing things. Remember Borland's Pascal
only calls DOS functions $4E (FindFirst), $4F (FindNext). It is DOS's
stupid way of handling attributes that does that.
Here is how DOS handles attributes in those calls:
If Attributes is 0, DOS returns ALL normal file entries. DOS does
not return hidden, system, or subdirectory files.
If Attributes is 2, 4, or 16, DOS returns each of those file types,
AND ALL DOS normal files.
If attribute is 8, DOS ONLY returns the disk volume label.
Best regards,
Mark Ouellet.
--- Squish v1.01
* Origin: The Sequel to Cramer VS Cramer: TPCramer VS UUencode ;-) (1:240/1.4)
* Tossed by SFToss/286 v1.02a on 92/11/28 08:05:09